.class public Lcom/brixd/niceapp/community/activity/AlbumListActivity;
.super Lcom/brixd/niceapp/activity/AbsActionBarSwipeBackActivity;
.source "AlbumListActivity.java"


# static fields
.field private static final REQUEST_CODE_RESELECT_PICTURE:I = 0xa


# instance fields
.field private mAdapter:Lcom/brixd/niceapp/community/adapter/AlbumListAdapter;

.field private mAlbumId:J

.field private mAlbumModels:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Lcom/brixd/niceapp/community/model/AlbumModel;",
            ">;"
        }
    .end annotation
.end field

.field private mLastSelectedCount:I

.field private mListView:Landroid/widget/ListView;


# direct methods
.method public constructor <init>()V
    .registers 2

    .prologue
    .line 29
    invoke-direct {p0}, Lcom/brixd/niceapp/activity/AbsActionBarSwipeBackActivity;-><init>()V

    .line 34
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/brixd/niceapp/community/activity/AlbumListActivity;->mAlbumModels:Ljava/util/ArrayList;

    return-void
.end method

.method static synthetic access$000(Lcom/brixd/niceapp/community/activity/AlbumListActivity;)Landroid/content/Context;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/AlbumListActivity;

    .prologue
    .line 29
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/AlbumListActivity;->getContext()Landroid/content/Context;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$100(Lcom/brixd/niceapp/community/activity/AlbumListActivity;)Ljava/util/ArrayList;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/AlbumListActivity;

    .prologue
    .line 29
    iget-object v0, p0, Lcom/brixd/niceapp/community/activity/AlbumListActivity;->mAlbumModels:Ljava/util/ArrayList;

    return-object v0
.end method

.method static synthetic access$200(Lcom/brixd/niceapp/community/activity/AlbumListActivity;)I
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/AlbumListActivity;

    .prologue
    .line 29
    iget v0, p0, Lcom/brixd/niceapp/community/activity/AlbumListActivity;->mLastSelectedCount:I

    return v0
.end method

.method static synthetic access$300(Lcom/brixd/niceapp/community/activity/AlbumListActivity;)Landroid/content/Context;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/AlbumListActivity;

    .prologue
    .line 29
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/AlbumListActivity;->getContext()Landroid/content/Context;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$400(Lcom/brixd/niceapp/community/activity/AlbumListActivity;)Lcom/brixd/niceapp/community/adapter/AlbumListAdapter;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/AlbumListActivity;

    .prologue
    .line 29
    iget-object v0, p0, Lcom/brixd/niceapp/community/activity/AlbumListActivity;->mAdapter:Lcom/brixd/niceapp/community/adapter/AlbumListAdapter;

    return-object v0
.end method

.method private initAlbumModels()V
    .registers 8

    .prologue
    const/4 v4, 0x0

    .line 135
    sget-object v2, Landroid/provider/MediaStore$Images$Media;->EXTERNAL_CONTENT_URI:Landroid/net/Uri;

    .line 136
    .local v2, "images":Landroid/net/Uri;
    const/4 v3, 0x3

    new-array v0, v3, [Ljava/lang/String;

    const-string v3, "bucket_id"

    aput-object v3, v0, v4

    const/4 v3, 0x1

    const-string v4, "bucket_display_name"

    aput-object v4, v0, v3

    const/4 v3, 0x2

    const-string v4, "_data"

    aput-object v4, v0, v3

    .line 139
    .local v0, "columns":[Ljava/lang/String;
    :try_start_14
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/AlbumListActivity;->getLoaderManager()Landroid/app/LoaderManager;

    move-result-object v3

    const/4 v4, 0x0

    const/4 v5, 0x0

    new-instance v6, Lcom/brixd/niceapp/community/activity/AlbumListActivity$3;

    invoke-direct {v6, p0, v2, v0}, Lcom/brixd/niceapp/community/activity/AlbumListActivity$3;-><init>(Lcom/brixd/niceapp/community/activity/AlbumListActivity;Landroid/net/Uri;[Ljava/lang/String;)V

    invoke-virtual {v3, v4, v5, v6}, Landroid/app/LoaderManager;->initLoader(ILandroid/os/Bundle;Landroid/app/LoaderManager$LoaderCallbacks;)Landroid/content/Loader;
    :try_end_22
    .catch Ljava/lang/Exception; {:try_start_14 .. :try_end_22} :catch_23

    .line 203
    :goto_22
    return-void

    .line 200
    :catch_23
    move-exception v1

    .line 201
    .local v1, "e":Ljava/lang/Exception;
    invoke-virtual {v1}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_22
.end method

.method private initData()V
    .registers 3

    .prologue
    .line 78
    new-instance v0, Lcom/brixd/niceapp/community/adapter/AlbumListAdapter;

    iget-object v1, p0, Lcom/brixd/niceapp/community/activity/AlbumListActivity;->mAlbumModels:Ljava/util/ArrayList;

    invoke-direct {v0, p0, v1}, Lcom/brixd/niceapp/community/adapter/AlbumListAdapter;-><init>(Landroid/content/Context;Ljava/util/ArrayList;)V

    iput-object v0, p0, Lcom/brixd/niceapp/community/activity/AlbumListActivity;->mAdapter:Lcom/brixd/niceapp/community/adapter/AlbumListAdapter;

    .line 79
    invoke-direct {p0}, Lcom/brixd/niceapp/community/activity/AlbumListActivity;->initAlbumModels()V

    .line 80
    return-void
.end method

.method private initWidets()V
    .registers 4

    .prologue
    const/16 v2, 0x8

    .line 84
    const v0, 0x7f0a002b

    invoke-virtual {p0, v0}, Lcom/brixd/niceapp/community/activity/AlbumListActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ListView;

    iput-object v0, p0, Lcom/brixd/niceapp/community/activity/AlbumListActivity;->mListView:Landroid/widget/ListView;

    .line 85
    iget-object v0, p0, Lcom/brixd/niceapp/community/activity/AlbumListActivity;->mListView:Landroid/widget/ListView;

    iget-object v1, p0, Lcom/brixd/niceapp/community/activity/AlbumListActivity;->mAdapter:Lcom/brixd/niceapp/community/adapter/AlbumListAdapter;

    invoke-virtual {v0, v1}, Landroid/widget/ListView;->setAdapter(Landroid/widget/ListAdapter;)V

    .line 87
    invoke-virtual {p0, v2}, Lcom/brixd/niceapp/community/activity/AlbumListActivity;->setTopTitleVisibility(I)V

    .line 88
    invoke-virtual {p0, v2}, Lcom/brixd/niceapp/community/activity/AlbumListActivity;->setSearchAreaVisibility(I)V

    .line 89
    const v0, 0x7f0c0037

    invoke-virtual {p0, v0}, Lcom/brixd/niceapp/community/activity/AlbumListActivity;->setBackText(I)V

    .line 90
    invoke-virtual {p0, v2}, Lcom/brixd/niceapp/community/activity/AlbumListActivity;->setCommitBtnVisibility(I)V

    .line 91
    return-void
.end method

.method private initWidgetsActions()V
    .registers 3

    .prologue
    .line 94
    iget-object v0, p0, Lcom/brixd/niceapp/community/activity/AlbumListActivity;->mListView:Landroid/widget/ListView;

    new-instance v1, Lcom/brixd/niceapp/community/activity/AlbumListActivity$1;

    invoke-direct {v1, p0}, Lcom/brixd/niceapp/community/activity/AlbumListActivity$1;-><init>(Lcom/brixd/niceapp/community/activity/AlbumListActivity;)V

    invoke-virtual {v0, v1}, Landroid/widget/ListView;->setOnItemClickListener(Landroid/widget/AdapterView$OnItemClickListener;)V

    .line 106
    new-instance v0, Lcom/brixd/niceapp/community/activity/AlbumListActivity$2;

    invoke-direct {v0, p0}, Lcom/brixd/niceapp/community/activity/AlbumListActivity$2;-><init>(Lcom/brixd/niceapp/community/activity/AlbumListActivity;)V

    invoke-virtual {p0, v0}, Lcom/brixd/niceapp/community/activity/AlbumListActivity;->setOnBackClickListener(Landroid/view/View$OnClickListener;)V

    .line 114
    return-void
.end method


# virtual methods
.method public onActivityResult(IILandroid/content/Intent;)V
    .registers 8
    .param p1, "requestCode"    # I
    .param p2, "resultCode"    # I
    .param p3, "data"    # Landroid/content/Intent;

    .prologue
    const/16 v3, 0x3e9

    const/4 v2, -0x1

    const/4 v1, 0x0

    .line 118
    invoke-super {p0, p1, p2, p3}, Lcom/brixd/niceapp/activity/AbsActionBarSwipeBackActivity;->onActivityResult(IILandroid/content/Intent;)V

    .line 119
    const/16 v0, 0x3e8

    if-ne p2, v0, :cond_12

    .line 120
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/AlbumListActivity;->finish()V

    .line 121
    invoke-virtual {p0, v1, v1}, Lcom/brixd/niceapp/community/activity/AlbumListActivity;->overridePendingTransition(II)V

    .line 131
    :cond_11
    :goto_11
    return-void

    .line 122
    :cond_12
    if-ne p2, v3, :cond_1e

    .line 123
    invoke-virtual {p0, v3}, Lcom/brixd/niceapp/community/activity/AlbumListActivity;->setResult(I)V

    .line 124
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/AlbumListActivity;->finish()V

    .line 125
    invoke-virtual {p0, v1, v1}, Lcom/brixd/niceapp/community/activity/AlbumListActivity;->overridePendingTransition(II)V

    goto :goto_11

    .line 126
    :cond_1e
    if-ne p2, v2, :cond_11

    .line 127
    invoke-virtual {p0, v2, p3}, Lcom/brixd/niceapp/community/activity/AlbumListActivity;->setResult(ILandroid/content/Intent;)V

    .line 128
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/AlbumListActivity;->finish()V

    .line 129
    invoke-virtual {p0, v1, v1}, Lcom/brixd/niceapp/community/activity/AlbumListActivity;->overridePendingTransition(II)V

    goto :goto_11
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .registers 8
    .param p1, "savedInstanceState"    # Landroid/os/Bundle;

    .prologue
    const-wide/16 v4, 0x0

    .line 41
    invoke-super {p0, p1}, Lcom/brixd/niceapp/activity/AbsActionBarSwipeBackActivity;->onCreate(Landroid/os/Bundle;)V

    .line 42
    const v1, 0x7f03000f

    invoke-virtual {p0, v1}, Lcom/brixd/niceapp/community/activity/AlbumListActivity;->setContentView(I)V

    .line 44
    invoke-direct {p0}, Lcom/brixd/niceapp/community/activity/AlbumListActivity;->initData()V

    .line 45
    invoke-direct {p0}, Lcom/brixd/niceapp/community/activity/AlbumListActivity;->initWidets()V

    .line 46
    invoke-direct {p0}, Lcom/brixd/niceapp/community/activity/AlbumListActivity;->initWidgetsActions()V

    .line 48
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/AlbumListActivity;->getIntent()Landroid/content/Intent;

    move-result-object v1

    const-string v2, "AlbumId"

    invoke-virtual {v1, v2, v4, v5}, Landroid/content/Intent;->getLongExtra(Ljava/lang/String;J)J

    move-result-wide v2

    iput-wide v2, p0, Lcom/brixd/niceapp/community/activity/AlbumListActivity;->mAlbumId:J

    .line 49
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/AlbumListActivity;->getIntent()Landroid/content/Intent;

    move-result-object v1

    const-string v2, "LastSelectedCount"

    const/4 v3, 0x0

    invoke-virtual {v1, v2, v3}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I

    move-result v1

    iput v1, p0, Lcom/brixd/niceapp/community/activity/AlbumListActivity;->mLastSelectedCount:I

    .line 51
    iget-wide v2, p0, Lcom/brixd/niceapp/community/activity/AlbumListActivity;->mAlbumId:J

    cmp-long v1, v2, v4

    if-eqz v1, :cond_51

    .line 52
    new-instance v0, Landroid/content/Intent;

    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/AlbumListActivity;->getContext()Landroid/content/Context;

    move-result-object v1

    const-class v2, Lcom/brixd/niceapp/community/activity/AlbumActivity;

    invoke-direct {v0, v1, v2}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 53
    .local v0, "intent":Landroid/content/Intent;
    const-string v1, "AlbumId"

    iget-wide v2, p0, Lcom/brixd/niceapp/community/activity/AlbumListActivity;->mAlbumId:J

    invoke-virtual {v0, v1, v2, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;J)Landroid/content/Intent;

    .line 54
    const-string v1, "LastSelectedCount"

    iget v2, p0, Lcom/brixd/niceapp/community/activity/AlbumListActivity;->mLastSelectedCount:I

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    .line 55
    const/16 v1, 0xa

    invoke-virtual {p0, v0, v1}, Lcom/brixd/niceapp/community/activity/AlbumListActivity;->startActivityForResult(Landroid/content/Intent;I)V

    .line 58
    .end local v0    # "intent":Landroid/content/Intent;
    :cond_51
    return-void
.end method

.method protected onPause()V
    .registers 2

    .prologue
    .line 70
    invoke-super {p0}, Lcom/brixd/niceapp/activity/AbsActionBarSwipeBackActivity;->onPause()V

    .line 72
    const-string v0, "AlbumListActivity"

    invoke-static {v0}, Lcom/umeng/analytics/MobclickAgent;->onPageEnd(Ljava/lang/String;)V

    .line 73
    invoke-static {p0}, Lcom/umeng/analytics/MobclickAgent;->onPause(Landroid/content/Context;)V

    .line 74
    return-void
.end method

.method protected onResume()V
    .registers 2

    .prologue
    .line 62
    invoke-super {p0}, Lcom/brixd/niceapp/activity/AbsActionBarSwipeBackActivity;->onResume()V

    .line 64
    const-string v0, "AlbumListActivity"

    invoke-static {v0}, Lcom/umeng/analytics/MobclickAgent;->onPageStart(Ljava/lang/String;)V

    .line 65
    invoke-static {p0}, Lcom/umeng/analytics/MobclickAgent;->onResume(Landroid/content/Context;)V

    .line 66
    return-void
.end method
